package com.easy.west.westclient.api.workplan.api;

import com.easy.west.westclient.api.base.bean.SuccessBean;
import com.easy.west.westclient.api.workplan.baen.EventList;

import retrofit2.Call;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;
import retrofit2.http.PUT;

/**
 * 请求接口
 * Created by xiatao on 2018/7/2.
 */

public interface WorkPlanService {
    /***
     * 上传日程
     * @param uid
     * @param starttime
     * @param endtime
     * @param content
     * @return
     */
    @FormUrlEncoded
    @POST("plans/create")
    Call<SuccessBean> uploadWorkPlan(@Field("starttime") String starttime, @Field("endtime") String endtime, @Field("content") String content, @Field("date") String date, @Field("top") boolean top, @Field("uid") long uid);

    /**
     * 获取所有的日程
     * @param uid
     * @return
     */
    @FormUrlEncoded
    @POST("plans/find/all")
    Call<EventList>  getAllEvents(@Field("uid") long uid);
    /***
     * 修改日程
     * @param uid
     * @param starttime
     * @param endtime
     * @param content
     * @return
     */
    @FormUrlEncoded
    @PUT("plans/update")
    Call<SuccessBean> changeWorkPlan(@Field("id") long id, @Field("starttime") String starttime, @Field("endtime") String endtime, @Field("content") String content, @Field("date") String date, @Field("top") boolean top, @Field("userId") long uid);

    /**
     * 删除警告
     * @param pid
     * @return
     */
    @FormUrlEncoded
    @POST("plans/delete")
    Call<SuccessBean> delete(@Field("pid") long pid);
}
